﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using PSE.Tools.Cryptographer.View;
using PSE.Framework.Cryptography;

namespace PSE.Tools.Cryptographer.Application
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : System.Windows.Application
    {
        public App()
        {
            this.ShutdownMode = ShutdownMode.OnMainWindowClose;
            this.MainWindow = new CryptographerWindow(GetCryptoKey(), RSACryptographer.PublicKey);
            this.MainWindow.ShowDialog();
        }

        private byte[] GetCryptoKey()
        {
            byte[] keyCopy = new byte[Constants.CRYPTO_KEY.Length];
            Constants.CRYPTO_KEY.CopyTo(keyCopy, 0);
            return keyCopy;
        }
    }
}
